Integrand size = 31, antiderivative size = 117 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {1}{2} a^3 (7 A+6 B) x+\frac {a^3 (A+3 B) \text {arctanh}(\sin (c+d x))}{d}+\frac {5 a^3 A \sin (c+d x)}{2 d}+\frac {a A \cos (c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{2 d}-\frac {(A-2 B) \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{2 d} \]
1/2*a^3*(7*A+6*B)*x+a^3*(A+3*B)*arctanh(sin(d*x+c))/d+5/2*a^3*A*sin(d*x+c) /d+1/2*a*A*cos(d*x+c)*(a+a*sec(d*x+c))^2*sin(d*x+c)/d-1/2*(A-2*B)*(a^3+a^3 *sec(d*x+c))*sin(d*x+c)/d
Leaf count is larger than twice the leaf count of optimal. \(302\) vs. \(2(117)=234\).
Time = 4.79 (sec) , antiderivative size = 302, normalized size of antiderivative = 2.58 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {a^3 \cos ^4(c+d x) \sec ^6\left (\frac {1}{2} (c+d x)\right ) (1+\sec (c+d x))^3 (A+B \sec (c+d x)) \left (2 (7 A+6 B) x-\frac {4 (A+3 B) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {4 (A+3 B) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {4 (3 A+B) \cos (d x) \sin (c)}{d}+\frac {A \cos (2 d x) \sin (2 c)}{d}+\frac {4 (3 A+B) \cos (c) \sin (d x)}{d}+\frac {A \cos (2 c) \sin (2 d x)}{d}+\frac {4 B \sin \left (\frac {d x}{2}\right )}{d \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {4 B \sin \left (\frac {d x}{2}\right )}{d \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}\right )}{32 (B+A \cos (c+d x))} \]
(a^3*Cos[c + d*x]^4*Sec[(c + d*x)/2]^6*(1 + Sec[c + d*x])^3*(A + B*Sec[c + d*x])*(2*(7*A + 6*B)*x - (4*(A + 3*B)*Log[Cos[(c + d*x)/2] - Sin[(c + d*x )/2]])/d + (4*(A + 3*B)*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]])/d + (4*( 3*A + B)*Cos[d*x]*Sin[c])/d + (A*Cos[2*d*x]*Sin[2*c])/d + (4*(3*A + B)*Cos [c]*Sin[d*x])/d + (A*Cos[2*c]*Sin[2*d*x])/d + (4*B*Sin[(d*x)/2])/(d*(Cos[c /2] - Sin[c/2])*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])) + (4*B*Sin[(d*x)/2] )/(d*(Cos[c/2] + Sin[c/2])*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]))))/(32*(B + A*Cos[c + d*x]))
Time = 0.68 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.99, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {3042, 4505, 3042, 4506, 3042, 4484, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^2(c+d x) (a \sec (c+d x)+a)^3 (A+B \sec (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4505 |
\(\displaystyle \frac {1}{2} \int \cos (c+d x) (\sec (c+d x) a+a)^2 (2 a (2 A+B)-a (A-2 B) \sec (c+d x))dx+\frac {a A \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2 \left (2 a (2 A+B)-a (A-2 B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {a A \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
\(\Big \downarrow \) 4506 |
\(\displaystyle \frac {1}{2} \left (\int \cos (c+d x) (\sec (c+d x) a+a) \left (5 A a^2+2 (A+3 B) \sec (c+d x) a^2\right )dx-\frac {(A-2 B) \sin (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}\right )+\frac {a A \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right ) \left (5 A a^2+2 (A+3 B) \csc \left (c+d x+\frac {\pi }{2}\right ) a^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx-\frac {(A-2 B) \sin (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}\right )+\frac {a A \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
\(\Big \downarrow \) 4484 |
\(\displaystyle \frac {1}{2} \left (-\int \left (-\left ((7 A+6 B) a^3\right )-2 (A+3 B) \sec (c+d x) a^3\right )dx-\frac {(A-2 B) \sin (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}+\frac {5 a^3 A \sin (c+d x)}{d}\right )+\frac {a A \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} \left (\frac {2 a^3 (A+3 B) \text {arctanh}(\sin (c+d x))}{d}-\frac {(A-2 B) \sin (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{d}+a^3 x (7 A+6 B)+\frac {5 a^3 A \sin (c+d x)}{d}\right )+\frac {a A \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^2}{2 d}\) |
(a*A*Cos[c + d*x]*(a + a*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) + (a^3*(7*A + 6*B)*x + (2*a^3*(A + 3*B)*ArcTanh[Sin[c + d*x]])/d + (5*a^3*A*Sin[c + d*x ])/d - ((A - 2*B)*(a^3 + a^3*Sec[c + d*x])*Sin[c + d*x])/d)/2
3.1.67.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[A*a*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*n)), x] + Simp[1/(d*n) Int[(d*Csc[e + f*x])^( n + 1)*Simp[n*(B*a + A*b) + (B*b*n + A*a*(n + 1))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && LeQ[n, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[a*A*Cot [e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*n)), x] - Sim p[b/(a*d*n) Int[(a + b*Csc[e + f*x])^(m - 1)*(d*Csc[e + f*x])^(n + 1)*Sim p[a*A*(m - n - 1) - b*B*n - (a*B*n + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0 ] && GtQ[m, 1/2] && LtQ[n, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-b)*B* Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*(m + n))), x] + Simp[1/(d*(m + n)) Int[(a + b*Csc[e + f*x])^(m - 1)*(d*Csc[e + f*x] )^n*Simp[a*A*d*(m + n) + B*(b*d*n) + (A*b*d*(m + n) + a*B*d*(2*m + n - 1))* Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && GtQ[m, 1/2] && !LtQ[n, -1]
Time = 1.96 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.04
method | result | size |
parallelrisch | \(\frac {\left (-8 \cos \left (d x +c \right ) \left (A +3 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+8 \cos \left (d x +c \right ) \left (A +3 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+4 \left (3 A +B \right ) \sin \left (2 d x +2 c \right )+A \sin \left (3 d x +3 c \right )+28 d \left (A +\frac {6 B}{7}\right ) x \cos \left (d x +c \right )+\sin \left (d x +c \right ) \left (A +8 B \right )\right ) a^{3}}{8 d \cos \left (d x +c \right )}\) | \(122\) |
derivativedivides | \(\frac {a^{3} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \tan \left (d x +c \right )+3 a^{3} A \left (d x +c \right )+3 B \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a^{3} A \sin \left (d x +c \right )+3 B \,a^{3} \left (d x +c \right )+a^{3} A \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,a^{3} \sin \left (d x +c \right )}{d}\) | \(128\) |
default | \(\frac {a^{3} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \tan \left (d x +c \right )+3 a^{3} A \left (d x +c \right )+3 B \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+3 a^{3} A \sin \left (d x +c \right )+3 B \,a^{3} \left (d x +c \right )+a^{3} A \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,a^{3} \sin \left (d x +c \right )}{d}\) | \(128\) |
risch | \(\frac {7 a^{3} A x}{2}+3 a^{3} x B -\frac {i a^{3} A \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}-\frac {3 i a^{3} A \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {i {\mathrm e}^{i \left (d x +c \right )} B \,a^{3}}{2 d}+\frac {3 i a^{3} A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} B \,a^{3}}{2 d}+\frac {i a^{3} A \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+\frac {2 i B \,a^{3}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{d}+\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{d}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}-\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{d}\) | \(240\) |
norman | \(\frac {\left (-\frac {7}{2} a^{3} A -3 B \,a^{3}\right ) x +\left (-\frac {7}{2} a^{3} A -3 B \,a^{3}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (\frac {7}{2} a^{3} A +3 B \,a^{3}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (\frac {7}{2} a^{3} A +3 B \,a^{3}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (-7 a^{3} A -6 B \,a^{3}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\left (7 a^{3} A +6 B \,a^{3}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\frac {5 a^{3} A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}-\frac {4 a^{3} \left (2 A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {2 a^{3} \left (3 A -2 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}+\frac {4 a^{3} \left (4 A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {a^{3} \left (7 A +4 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}+\frac {a^{3} \left (A +3 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a^{3} \left (A +3 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(346\) |
1/8*(-8*cos(d*x+c)*(A+3*B)*ln(tan(1/2*d*x+1/2*c)-1)+8*cos(d*x+c)*(A+3*B)*l n(tan(1/2*d*x+1/2*c)+1)+4*(3*A+B)*sin(2*d*x+2*c)+A*sin(3*d*x+3*c)+28*d*(A+ 6/7*B)*x*cos(d*x+c)+sin(d*x+c)*(A+8*B))*a^3/d/cos(d*x+c)
Time = 0.31 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.09 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {{\left (7 \, A + 6 \, B\right )} a^{3} d x \cos \left (d x + c\right ) + {\left (A + 3 \, B\right )} a^{3} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (A + 3 \, B\right )} a^{3} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (A a^{3} \cos \left (d x + c\right )^{2} + 2 \, {\left (3 \, A + B\right )} a^{3} \cos \left (d x + c\right ) + 2 \, B a^{3}\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \]
1/2*((7*A + 6*B)*a^3*d*x*cos(d*x + c) + (A + 3*B)*a^3*cos(d*x + c)*log(sin (d*x + c) + 1) - (A + 3*B)*a^3*cos(d*x + c)*log(-sin(d*x + c) + 1) + (A*a^ 3*cos(d*x + c)^2 + 2*(3*A + B)*a^3*cos(d*x + c) + 2*B*a^3)*sin(d*x + c))/( d*cos(d*x + c))
\[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=a^{3} \left (\int A \cos ^{2}{\left (c + d x \right )}\, dx + \int 3 A \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 3 A \cos ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int A \cos ^{2}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int B \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 3 B \cos ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 3 B \cos ^{2}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int B \cos ^{2}{\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx\right ) \]
a**3*(Integral(A*cos(c + d*x)**2, x) + Integral(3*A*cos(c + d*x)**2*sec(c + d*x), x) + Integral(3*A*cos(c + d*x)**2*sec(c + d*x)**2, x) + Integral(A *cos(c + d*x)**2*sec(c + d*x)**3, x) + Integral(B*cos(c + d*x)**2*sec(c + d*x), x) + Integral(3*B*cos(c + d*x)**2*sec(c + d*x)**2, x) + Integral(3*B *cos(c + d*x)**2*sec(c + d*x)**3, x) + Integral(B*cos(c + d*x)**2*sec(c + d*x)**4, x))
Time = 0.21 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.20 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} + 12 \, {\left (d x + c\right )} A a^{3} + 12 \, {\left (d x + c\right )} B a^{3} + 2 \, A a^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 6 \, B a^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 12 \, A a^{3} \sin \left (d x + c\right ) + 4 \, B a^{3} \sin \left (d x + c\right ) + 4 \, B a^{3} \tan \left (d x + c\right )}{4 \, d} \]
1/4*((2*d*x + 2*c + sin(2*d*x + 2*c))*A*a^3 + 12*(d*x + c)*A*a^3 + 12*(d*x + c)*B*a^3 + 2*A*a^3*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 6* B*a^3*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 12*A*a^3*sin(d*x + c) + 4*B*a^3*sin(d*x + c) + 4*B*a^3*tan(d*x + c))/d
Time = 0.32 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.64 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=-\frac {\frac {4 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} - {\left (7 \, A a^{3} + 6 \, B a^{3}\right )} {\left (d x + c\right )} - 2 \, {\left (A a^{3} + 3 \, B a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) + 2 \, {\left (A a^{3} + 3 \, B a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (5 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 7 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
-1/2*(4*B*a^3*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 - 1) - (7*A*a^3 + 6*B*a^3)*(d*x + c) - 2*(A*a^3 + 3*B*a^3)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) + 2*(A*a^3 + 3*B*a^3)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(5*A*a^3 *tan(1/2*d*x + 1/2*c)^3 + 2*B*a^3*tan(1/2*d*x + 1/2*c)^3 + 7*A*a^3*tan(1/2 *d*x + 1/2*c) + 2*B*a^3*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1) ^2)/d
Time = 13.71 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.68 \[ \int \cos ^2(c+d x) (a+a \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {3\,A\,a^3\,\sin \left (c+d\,x\right )}{d}+\frac {B\,a^3\,\sin \left (c+d\,x\right )}{d}+\frac {7\,A\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,A\,a^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {6\,B\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {6\,B\,a^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {B\,a^3\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {A\,a^3\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{2\,d} \]
(3*A*a^3*sin(c + d*x))/d + (B*a^3*sin(c + d*x))/d + (7*A*a^3*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (2*A*a^3*atanh(sin(c/2 + (d*x)/2)/cos( c/2 + (d*x)/2)))/d + (6*B*a^3*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))) /d + (6*B*a^3*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (B*a^3*sin (c + d*x))/(d*cos(c + d*x)) + (A*a^3*cos(c + d*x)*sin(c + d*x))/(2*d)